@charset 'utf-8';

/* TOC模块 */

.table-of-content-wrap {
    position: fixed;
    top: 10%;
    right: 3%;
    z-index: 999;
    background-color: #fff;
    width: 300px;
    border: 1px solid rgba(27, 31, 35, 0.15);
    box-shadow: 0 3px 12px rgba(27, 31, 35, 0.15);
    border-radius: 5px;
    display: none;
    transition: all 0.5s ease-out;
}

.table-of-content-wrap:hover {
    display: block!important;
}

.table-of-content {
    padding: 1em;
    color: #fff;
    height: 550px;
    overflow: auto;
    cursor: move;
}

.table-of-content-header .table-of-content-auth {
    color: green;
    position: absolute;
    margin-top: 5px;
    margin-left: 10px;
    font-size: 12px;
    text-decoration: none;
    font-style: italic;
    opacity: 0.7
}

.table-of-content-header .table-of-content-auth:hover {
    opacity: 1
}

.table-of-content-btn {
    position: absolute;
    transition: all 0.3s ease-out;
    top: 6px;
    left: 10px;
    width: 30px;
    height: 30px;
    padding: 6px !important;
    cursor: pointer;
    color: #24292e;
    background-color: #eff3f6;
    background-image: linear-gradient(-180deg, #fafbfc 0%, #eff3f6 90%);
    border: 1px solid rgba(27, 31, 35, 0.2);
    background: url(data:image/svg+xml;charset=UTF-8,%3Csvg%20style%3D%22fill%3A%20%234183c4%22%20height%3D%2216%22%20width%3D%228%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Cpath%20d%3D%22M7.5%208L2.5%2013l-1.5-1.5%203.75-3.5L1%204.5l1.5-1.5%205%205z%22%20%2F%3E%0A%3C%2Fsvg%3E%0A) center no-repeat;
}

.table-of-content-btn:hover {
    background-color: #e6ebf1;
    border-color: rgba(27, 31, 35, 0.35);
}

.table-of-content-wrap[toggle=off] {
    transition: all 0.3s ease-out;
}

.table-of-content-wrap[toggle=off] .table-of-content-btn {
    transition: all 0.3s ease-out;
    background-color: #fff!important;
    background: url(data:image/svg+xml;charset=UTF-8,%3Csvg%20height%3D%2216%22%20width%3D%228%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Cpath%20d%3D%22M5.5%203l1.5%201.5-3.75%203.5%203.75%203.5-1.5%201.5L0.5%208l5-5z%22%20%2F%3E%0A%3C%2Fsvg%3E%0A) center no-repeat;
}

.table-of-content-header {
    color: #333;
    font-weight: bold;
    font-size: 18px;
    line-height: 40px;
    border-bottom: 1px solid #d3d3d3;
    text-align: center;
    cursor: move;
}

.table-of-content::-webkit-scrollbar {
    display: none;
    /* 隐藏滚动条 */
}


/* 所有LI共同的样式 */

.table-of-content li {
    list-style: none;
    cursor: pointer;
    line-height: 22px;
    max-height: 22px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 1s ease-out;
    font-size: 12px;
}

.table-of-content li:hover {
    max-height: 600px;
    transition: all 3s ease-out;
}


/* 一级LI的样式 */

.table-of-content>li {
    line-height: 26px;
    max-height: 26px;
    font-size: 14px;
    font-weight: bold;
}


/* 一级LI下面所有A标签的样式 */

.table-of-content>li>span:hover {
    border-left: 3px solid rgba(86, 61, 124, 0.5);
    padding-left: calc(1em - 3px);
    text-decoration: none;
}


/* 所有A标签的样式 */

.table-of-content span {
    color: gray;
    text-decoration: none;
    padding-left: 1em;
    display: inline-block;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.table-of-content span:hover {
    background-color: #f3f3f3;
    color: #009a61;
}


/* 所有二级LI下A标签样式 */

.table-of-content li>ul>li>span {
    padding-left: 3em;
}

.table-of-content li>ul>li>span:hover {
    border-left: 2px solid rgba(86, 61, 124, 0.5);
    padding-left: calc(3em - 2px);
    text-decoration: none;
}


/* LI两层嵌套UL */

.table-of-content li>ul>li>ul>li>span {
    padding-left: 4em;
}

.table-of-content li>ul>li>ul>li>span:hover {
    border-left: 2px solid rgba(86, 61, 124, 0.5);
    padding-left: calc(4em - 2px);
    text-decoration: none;
}


/* LI三层嵌套UL */

.table-of-content li>ul>li>ul>li>ul>li>span {
    padding-left: 5em;
}

.table-of-content li>ul>li>ul>li>ul>li>span:hover {
    border-left: 2px solid rgba(86, 61, 124, 0.5);
    padding-left: calc(5em - 2px);
    text-decoration: none;
}


/* LI四层嵌套UL */

.table-of-content li>ul>li>ul>li>ul>li>ul>li>span {
    padding-left: 6em;
}

.table-of-content li>ul>li>ul>li>ul>li>ul>li>span:hover {
    border-left: 2px solid rgba(86, 61, 124, 0.5);
    padding-left: calc(6em - 2px);
    text-decoration: none;
}


/* LI五层嵌套UL */

.table-of-content li>ul>li>ul>li>ul>li>ul>li>ul>li>span {
    padding-left: 7em;
}

.table-of-content li>ul>li>ul>li>ul>li>ul>li>ul>li>span:hover {
    border-left: 2px solid rgba(86, 61, 124, 0.5);
    padding-left: calc(7em - 2px);
    text-decoration: none;
}